import request from '@/utils/request'

export function fetchsourceList(data) {
  return request({
    url: '/system/metadata/source/treeList',
    method: 'post',
    data,
  })
}

export function getsource(id) {
  return request({
    url: '/system/metadata/source/detail/' + id,
    method: 'get',
    params: { id },
  })
}

export function createsource(data) {
  return request({
    url: '/system/metadata/source/add',
    method: 'post',
    data,
  })
}
export function getTotalModel(data) {
  return request({
    url: '/springboot-scala/hive/dataList',
    method: 'post',
    params: data,
  })
}

export function updatesource(data) {
  return request({
    url: '/system/metadata/source/update',
    method: 'post',
    data,
  })
}

export function deletesource(ids) {
  return request({
    url: '/system/metadata/source/delete',
    method: 'post',
    data: { ids },
  })
}
